<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-name-shadowing #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- (c) The University of Glasgow 2007</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- | Break Arrays</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- An array of bytes, indexed by a breakpoint number (breakpointId in Tickish)</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- There is one of these arrays per module.</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Each byte is</span><span>
</span><span id="line-14"></span><span class="hs-comment">--   1 if the corresponding breakpoint is enabled</span><span>
</span><span id="line-15"></span><span class="hs-comment">--   0 otherwise</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHCi.BreakArray</span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier">BreakArray</span></a></span><span>
</span><span id="line-22"></span><span>          </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier">BA</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- constructor is exported only for GHC.CoreToByteCode</span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#newBreakArray"><span class="hs-identifier">newBreakArray</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#getBreak"><span class="hs-identifier">getBreak</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#setBreakOn"><span class="hs-identifier">setBreakOn</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#setBreakOff"><span class="hs-identifier">setBreakOff</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#showBreakArray"><span class="hs-identifier">showBreakArray</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-comment">-- See note [Why do we import Prelude here?]</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#"><span class="hs-identifier">GHC.Word</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#"><span class="hs-identifier">GHC.IO</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="hs-identifier">IO</span></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.Unsafe.html#"><span class="hs-identifier">System.IO.Unsafe</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier">unsafeDupablePerformIO</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">data</span><span> </span><span id="BreakArray"><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-var">BreakArray</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BA"><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-var">BA</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">MutableByteArray#</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">RealWorld</span></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="annot"><a href="GHCi.BreakArray.html#breakOff"><span class="hs-identifier hs-type">breakOff</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#breakOn"><span class="hs-identifier hs-type">breakOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-42"></span><span id="breakOn"><span class="annot"><span class="annottext">breakOn :: Word8
</span><a href="GHCi.BreakArray.html#breakOn"><span class="hs-identifier hs-var hs-var">breakOn</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span>
</span><span id="line-43"></span><span id="breakOff"><span class="annot"><span class="annottext">breakOff :: Word8
</span><a href="GHCi.BreakArray.html#breakOff"><span class="hs-identifier hs-var hs-var">breakOff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="annot"><a href="GHCi.BreakArray.html#showBreakArray"><span class="hs-identifier hs-type">showBreakArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span id="showBreakArray"><span class="annot"><span class="annottext">showBreakArray :: BreakArray -&gt; IO ()
</span><a href="GHCi.BreakArray.html#showBreakArray"><span class="hs-identifier hs-var hs-var">showBreakArray</span></a></span></span><span> </span><span id="local-6989586621679086564"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086564"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><span class="annottext">[Int] -&gt; (Int -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
t a -&gt; (a -&gt; m b) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#forM_"><span class="hs-identifier hs-var">forM_</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BreakArray -&gt; Int
</span><a href="GHCi.BreakArray.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086564"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">((Int -&gt; IO ()) -&gt; IO ()) -&gt; (Int -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086561"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086561"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-48"></span><span>        </span><span id="local-6989586621679086560"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679086560"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; IO Word8
</span><a href="GHCi.BreakArray.html#readBreakArray"><span class="hs-identifier hs-var">readBreakArray</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086564"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086561"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#putStr"><span class="hs-identifier hs-var">putStr</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679086560"><span class="hs-identifier hs-var">val</span></a></span><span>
</span><span id="line-50"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#putStr"><span class="hs-identifier hs-var">putStr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="annot"><a href="GHCi.BreakArray.html#setBreakOn"><span class="hs-identifier hs-type">setBreakOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-53"></span><span id="setBreakOn"><span class="annot"><span class="annottext">setBreakOn :: BreakArray -&gt; Int -&gt; IO Bool
</span><a href="GHCi.BreakArray.html#setBreakOn"><span class="hs-identifier hs-var hs-var">setBreakOn</span></a></span></span><span> </span><span id="local-6989586621679086556"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086556"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086555"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086555"><span class="hs-identifier hs-var">index</span></a></span></span><span>
</span><span id="line-54"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; Bool
</span><a href="GHCi.BreakArray.html#safeIndex"><span class="hs-identifier hs-var">safeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086556"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086555"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-55"></span><span>          </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBreakArray"><span class="hs-identifier hs-var">writeBreakArray</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086556"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086555"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHCi.BreakArray.html#breakOn"><span class="hs-identifier hs-var">breakOn</span></a></span><span>
</span><span id="line-56"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="annot"><a href="GHCi.BreakArray.html#setBreakOff"><span class="hs-identifier hs-type">setBreakOff</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-60"></span><span id="setBreakOff"><span class="annot"><span class="annottext">setBreakOff :: BreakArray -&gt; Int -&gt; IO Bool
</span><a href="GHCi.BreakArray.html#setBreakOff"><span class="hs-identifier hs-var hs-var">setBreakOff</span></a></span></span><span> </span><span id="local-6989586621679086552"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086552"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086551"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086551"><span class="hs-identifier hs-var">index</span></a></span></span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; Bool
</span><a href="GHCi.BreakArray.html#safeIndex"><span class="hs-identifier hs-var">safeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086552"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086551"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-62"></span><span>          </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBreakArray"><span class="hs-identifier hs-var">writeBreakArray</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086552"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086551"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHCi.BreakArray.html#breakOff"><span class="hs-identifier hs-var">breakOff</span></a></span><span>
</span><span id="line-63"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="annot"><a href="GHCi.BreakArray.html#getBreak"><span class="hs-identifier hs-type">getBreak</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span id="getBreak"><span class="annot"><span class="annottext">getBreak :: BreakArray -&gt; Int -&gt; IO (Maybe Word8)
</span><a href="GHCi.BreakArray.html#getBreak"><span class="hs-identifier hs-var hs-var">getBreak</span></a></span></span><span> </span><span id="local-6989586621679086550"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086550"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086549"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086549"><span class="hs-identifier hs-var">index</span></a></span></span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; Bool
</span><a href="GHCi.BreakArray.html#safeIndex"><span class="hs-identifier hs-var">safeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086550"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086549"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-69"></span><span>          </span><span id="local-6989586621679086548"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679086548"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int -&gt; IO Word8
</span><a href="GHCi.BreakArray.html#readBreakArray"><span class="hs-identifier hs-var">readBreakArray</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086550"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086549"><span class="hs-identifier hs-var">index</span></a></span><span>
</span><span id="line-70"></span><span>          </span><span class="annot"><span class="annottext">Maybe Word8 -&gt; IO (Maybe Word8)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Word8 -&gt; IO (Maybe Word8))
-&gt; Maybe Word8 -&gt; IO (Maybe Word8)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679086548"><span class="hs-identifier hs-var">val</span></a></span><span>
</span><span id="line-71"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Word8 -&gt; IO (Maybe Word8)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="annot"><a href="GHCi.BreakArray.html#safeIndex"><span class="hs-identifier hs-type">safeIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-74"></span><span id="safeIndex"><span class="annot"><span class="annottext">safeIndex :: BreakArray -&gt; Int -&gt; Bool
</span><a href="GHCi.BreakArray.html#safeIndex"><span class="hs-identifier hs-var hs-var">safeIndex</span></a></span></span><span> </span><span id="local-6989586621679086547"><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086547"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086546"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086546"><span class="hs-identifier hs-var">index</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086546"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">BreakArray -&gt; Int
</span><a href="GHCi.BreakArray.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">BreakArray
</span><a href="#local-6989586621679086547"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086546"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="annot"><a href="GHCi.BreakArray.html#size"><span class="hs-identifier hs-type">size</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-77"></span><span id="size"><span class="annot"><span class="annottext">size :: BreakArray -&gt; Int
</span><a href="GHCi.BreakArray.html#size"><span class="hs-identifier hs-var hs-var">size</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-type">BA</span></a></span><span> </span><span id="local-6989586621679086543"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086543"><span class="hs-identifier hs-var">array</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086542"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-78"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-comment">-- We want to keep this operation pure. The mutable byte array</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-comment">-- is never resized so this is safe.</span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679086542"><span class="annot"><span class="annottext">size :: Int
</span><a href="#local-6989586621679086542"><span class="hs-identifier hs-var hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO Int -&gt; Int
forall a. IO a -&gt; a
</span><a href="../../base/src/GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier hs-var">unsafeDupablePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Int -&gt; Int) -&gt; IO Int -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; IO Int
</span><a href="#local-6989586621679086541"><span class="hs-identifier hs-var">sizeofMutableByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086543"><span class="hs-identifier hs-var">array</span></a></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span>    </span><span class="annot"><a href="#local-6989586621679086541"><span class="hs-identifier hs-type">sizeofMutableByteArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">MutableByteArray#</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">RealWorld</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-84"></span><span>    </span><span id="local-6989586621679086541"><span class="annot"><span class="annottext">sizeofMutableByteArray :: MutableByteArray# RealWorld -&gt; IO Int
</span><a href="#local-6989586621679086541"><span class="hs-identifier hs-var hs-var">sizeofMutableByteArray</span></a></span></span><span> </span><span id="local-6989586621679086540"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086540"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, Int #)) -&gt; IO Int
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><span class="hs-identifier hs-var">IO</span></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, Int #)) -&gt; IO Int)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, Int #)) -&gt; IO Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086539"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086539"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
forall d. MutableByteArray# d -&gt; State# d -&gt; (# State# d, Int# #)
</span><span class="hs-identifier hs-var">getSizeofMutableByteArray#</span></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086540"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086539"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-86"></span><span>                       </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679086538"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086538"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679086537"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086537"><span class="hs-identifier hs-var">n#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086538"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><span class="hs-identifier hs-var">I#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086537"><span class="hs-identifier hs-var">n#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="annot"><a href="GHCi.BreakArray.html#allocBA"><span class="hs-identifier hs-type">allocBA</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span>
</span><span id="line-89"></span><span id="allocBA"><span class="annot"><span class="annottext">allocBA :: Int -&gt; IO BreakArray
</span><a href="GHCi.BreakArray.html#allocBA"><span class="hs-identifier hs-var hs-var">allocBA</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621679086535"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086535"><span class="hs-identifier hs-var">sz</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, BreakArray #))
-&gt; IO BreakArray
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><span class="hs-identifier hs-var">IO</span></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, BreakArray #))
 -&gt; IO BreakArray)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, BreakArray #))
-&gt; IO BreakArray
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086534"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086534"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableByteArray# RealWorld #)
forall d. Int# -&gt; State# d -&gt; (# State# d, MutableByteArray# d #)
</span><span class="hs-identifier hs-var">newByteArray#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086535"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086534"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679086533"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086533"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679086532"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086532"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086533"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; BreakArray
</span><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-var">BA</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086532"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- create a new break array and initialise elements to zero</span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHCi.BreakArray.html#newBreakArray"><span class="hs-identifier hs-type">newBreakArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span>
</span><span id="line-94"></span><span id="newBreakArray"><span class="annot"><span class="annottext">newBreakArray :: Int -&gt; IO BreakArray
</span><a href="GHCi.BreakArray.html#newBreakArray"><span class="hs-identifier hs-var hs-var">newBreakArray</span></a></span></span><span> </span><span id="local-6989586621679086531"><span class="annot"><span class="annottext">entries :: Int
</span><a href="#local-6989586621679086531"><span class="hs-identifier hs-var">entries</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621679086530"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086530"><span class="hs-identifier hs-var">sz</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-95"></span><span>    </span><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-type">BA</span></a></span><span> </span><span id="local-6989586621679086529"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086529"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO BreakArray
</span><a href="GHCi.BreakArray.html#allocBA"><span class="hs-identifier hs-var">allocBA</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679086531"><span class="hs-identifier hs-var">entries</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHCi.BreakArray.html#breakOff"><span class="hs-identifier hs-var">breakOff</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679086528"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086528"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-98"></span><span>           </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679086525"><span class="annot"><span class="annottext">loop :: Int# -&gt; IO ()
</span><a href="#local-6989586621679086525"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span id="local-6989586621679086524"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086524"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><span class="hs-identifier hs-var">isTrue#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086524"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><span class="hs-operator hs-var">==#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086530"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; Int# -&gt; Word# -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBA%23"><span class="hs-identifier hs-var">writeBA#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086529"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086524"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086528"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; IO ()
</span><a href="#local-6989586621679086525"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086524"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><span class="hs-operator hs-var">+#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>           </span><span class="annot"><span class="annottext">Int# -&gt; IO ()
</span><a href="#local-6989586621679086525"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-101"></span><span>    </span><span class="annot"><span class="annottext">BreakArray -&gt; IO BreakArray
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(BreakArray -&gt; IO BreakArray) -&gt; BreakArray -&gt; IO BreakArray
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; BreakArray
</span><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-var">BA</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086529"><span class="hs-identifier hs-var">array</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="annot"><a href="GHCi.BreakArray.html#writeBA%23"><span class="hs-identifier hs-type">writeBA#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">MutableByteArray#</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">RealWorld</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Word#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span id="writeBA%23"><span class="annot"><span class="annottext">writeBA# :: MutableByteArray# RealWorld -&gt; Int# -&gt; Word# -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBA%23"><span class="hs-identifier hs-var hs-var">writeBA#</span></a></span></span><span> </span><span id="local-6989586621679086521"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086521"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086520"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086520"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679086519"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086519"><span class="hs-identifier hs-var">word</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ()
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><span class="hs-identifier hs-var">IO</span></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ())
-&gt; (State# RealWorld -&gt; (# State# RealWorld, () #)) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086518"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086518"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
-&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall d.
MutableByteArray# d -&gt; Int# -&gt; Word# -&gt; State# d -&gt; State# d
</span><span class="hs-identifier hs-var">writeWord8Array#</span></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086521"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086520"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086519"><span class="hs-identifier hs-var">word</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086518"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679086517"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086517"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086517"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="annot"><a href="GHCi.BreakArray.html#writeBreakArray"><span class="hs-identifier hs-type">writeBreakArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span id="writeBreakArray"><span class="annot"><span class="annottext">writeBreakArray :: BreakArray -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBreakArray"><span class="hs-identifier hs-var hs-var">writeBreakArray</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-type">BA</span></a></span><span> </span><span id="local-6989586621679086516"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086516"><span class="hs-identifier hs-var">array</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621679086515"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086515"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679086514"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086514"><span class="hs-identifier hs-var">word</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; Int# -&gt; Word# -&gt; IO ()
</span><a href="GHCi.BreakArray.html#writeBA%23"><span class="hs-identifier hs-var">writeBA#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086516"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086515"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086514"><span class="hs-identifier hs-var">word</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="annot"><a href="GHCi.BreakArray.html#readBA%23"><span class="hs-identifier hs-type">readBA#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">MutableByteArray#</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">RealWorld</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-111"></span><span id="readBA%23"><span class="annot"><span class="annottext">readBA# :: MutableByteArray# RealWorld -&gt; Int# -&gt; IO Word8
</span><a href="GHCi.BreakArray.html#readBA%23"><span class="hs-identifier hs-var hs-var">readBA#</span></a></span></span><span> </span><span id="local-6989586621679086512"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086512"><span class="hs-identifier hs-var">array</span></a></span></span><span> </span><span id="local-6989586621679086511"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086511"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, Word8 #)) -&gt; IO Word8
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><span class="hs-identifier hs-var">IO</span></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, Word8 #)) -&gt; IO Word8)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, Word8 #)) -&gt; IO Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679086510"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086510"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
forall d.
MutableByteArray# d -&gt; Int# -&gt; State# d -&gt; (# State# d, Word# #)
</span><span class="hs-identifier hs-var">readWord8Array#</span></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086512"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086511"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086510"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679086509"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086509"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679086508"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086508"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679086509"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word8
</span><a href="../../base/src/GHC.Word.html#W8%23"><span class="hs-identifier hs-var">W8#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679086508"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="annot"><a href="GHCi.BreakArray.html#readBreakArray"><span class="hs-identifier hs-type">readBreakArray</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHCi.BreakArray.html#BreakArray"><span class="hs-identifier hs-type">BreakArray</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-115"></span><span id="readBreakArray"><span class="annot"><span class="annottext">readBreakArray :: BreakArray -&gt; Int -&gt; IO Word8
</span><a href="GHCi.BreakArray.html#readBreakArray"><span class="hs-identifier hs-var hs-var">readBreakArray</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHCi.BreakArray.html#BA"><span class="hs-identifier hs-type">BA</span></a></span><span> </span><span id="local-6989586621679086507"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086507"><span class="hs-identifier hs-var">array</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621679086506"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086506"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; Int# -&gt; IO Word8
</span><a href="GHCi.BreakArray.html#readBA%23"><span class="hs-identifier hs-var">readBA#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679086507"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679086506"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-116"></span></pre></body></html>